// script.js
function addTodo() {
    const input = document.getElementById('todoInput');
    const text = input.value.trim();
    if (text === '') return;
    
    const li = document.createElement('li');
    li.innerHTML = `${text} <span class="delete-btn" onclick="this.parentElement.remove()">×</span>`;
    document.getElementById('todoList').appendChild(li);
    input.value = '';
}